#!/bin/ksh
#set -x
export ii=$II
export i=$I
if [[ "$op_sys" != "${op_sys##CYGWIN}" ]] ; then
  is_cygwin=1
else
  is_cygwin=0
fi
mdir=$1
if (( is_cygwin == 1 )) ; then
	uxfn="$(cygpath -u $2)"
else
	uxfn="$2"
fi
fn=$(basename $uxfn)
dir=$(dirname $uxfn)
ndir=${dir##$ii/}
if [[ "$ndir" != "$dir" ]] ; then
  dir=$ndir
fi
if [[ "$SVN_LOC" = "/bin" ]] ; then
	diff_pgm="/bin/diff"
else
	diff_pgm="\\cygwin\\bin\\diff"
fi
cd $mdir
cd $dir
$SVN_LOC/svn diff --diff-cmd $diff_pgm -x "-w" $fn 2>&1 | tee -a $ii/whysvn.diff
